package com.xja.zf.controller;

import com.xja.zf.entity.District;
import com.xja.zf.entity.House;
import com.xja.zf.entity.Htype;
import com.xja.zf.service.HouseService;
import org.apache.dubbo.config.annotation.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @program: zf_system
 * @description:
 * @author: 李晓龙
 * @create: 2021-12-23 14:50
 **/
@Controller
@RequestMapping("house")
public class HouserController {
    private Logger logger= LoggerFactory.getLogger(HouserController.class);
    @Reference(url = "dubbo://localhost:20882")
    private HouseService houseService;

    @RequestMapping("select")
    public String select(Model model, HttpSession session){
        List<Htype> htypeList = houseService.selectAllType();
        session.setAttribute("htypeList",htypeList);//户型
        List<District> districtList = houseService.selectAllDistrict();
        session.setAttribute("districtList",districtList);//区

        return "fabu";
    }


}
